package com.carltechnology.mahjonggamecaculation.utils.views;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TableLayout;
import android.widget.TextView;

import com.carltechnology.mahjonggamecaculation.R;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by WZTCM on 2016/7/5.
 */
public class InfoActionBarView extends TableLayout {
    private Context mContext;
    @InjectView(R.id.infobar_label_player1)
    TextView player1TextView;
    @InjectView(R.id.infobar_label_player2)
    TextView Player2TextView;
    @InjectView(R.id.infobar_label_player3)
    TextView player3TextView;
    @InjectView(R.id.infobar_label_player4)
    TextView Player4TextView;
    @InjectView(R.id.infobar_label_cost)
    TextView costTextView;
    @InjectView(R.id.infobar_label_perunit)
    TextView perunitTextView;
    public InfoActionBarView(Context context) {
        super(context);
        //mContext = context;
        initView(context);
    }

    public InfoActionBarView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context);
        TypedArray a = context.obtainStyledAttributes(attrs,R.styleable.InfoActionBar);
        try {

        }catch (Exception e){

        }finally {
            a.recycle();
        }
    }
    private void initView(Context context){
        mContext = context;
        View view = View.inflate(context, R.layout.infobar_mahjonggame_detail, this);
        ButterKnife.inject(this, view);
    }
    public TextView getPlayer1TextView() {
        return player1TextView;
    }

    public TextView getPlayer2TextView() {
        return Player2TextView;
    }

    public TextView getPlayer3TextView() {
        return player3TextView;
    }

    public TextView getPlayer4TextView() {
        return Player4TextView;
    }

    public TextView getCostTextView() {
        return costTextView;
    }

    public TextView getPerunitTextView() {
        return perunitTextView;
    }
}
